﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="competition.aspx.cs" Inherits="Admin_competition" Title="Competitions Management" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="RadDatePicker" ResourceUICultures="RadDatePicker" />
        </Scripts>
    </asp:ScriptManager>
    <center>            
        <asp:Button ID="cmdSearchEnable" runat="server" onclick="cmdSearchEnable_Click" 
            Text="Enable Search Area" Height="30px" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button 
            ID="cmdAddEnable" runat="server" Text="Enable Add Area" 
            onclick="cmdAddEnable_Click" Height="30px" />
    </center>
    <asp:Panel ID="Panel1" CssClass="panel" runat="server">
        <div class="row">
            <div class="left">ID:</div>
            <div class="right"><asp:TextBox ID="txtId" runat="server" Width="50px" ></asp:TextBox></div>
        </div>
        <div class="clear"></div>
        <div class="row">
            <div class="left">Title:</div>
            <div class="right"><asp:TextBox ID="txtTitle" runat="server" Width="350px"></asp:TextBox>
                <asp:Label ID="lblTitleError" runat="server" ForeColor="Red" Text="Not null" 
                    Visible="False"></asp:Label>
            </div>
        </div>
        <div class="clear"></div>
        <asp:Panel ID="PanelInvi1" runat="server">
        <div class="row">
            <div class="left">Description:</div>
            <div class="right"><asp:TextBox ID="txtDes" runat="server" Width="350px" 
                    Height="80px" TextMode="MultiLine"></asp:TextBox>
            </div>
        </div>
        </asp:Panel>
        <div class="clear"></div>
        <asp:Panel ID="PanelInvi2" runat="server">
        <div class="row">
            <div class="left">Content:</div>
            <div class="right"><CKEditor:CKEditorControl ID="CKEditor1" runat="server" 
                    Width="770px"></CKEditor:CKEditorControl>
                    </div>
        </div>
        </asp:Panel>
        <div class="clear"></div>
        <div class="row">
            <div class="left">Status:</div>
            <div class="right">
                <asp:RadioButtonList ID="RadioButtonList1" runat="server" 
                    RepeatDirection="Horizontal">
                
                    <asp:ListItem Value="True">Active</asp:ListItem>
                    <asp:ListItem Value="False">Inactive</asp:ListItem>
                
                </asp:RadioButtonList>
                <asp:Label ID="lblStatusError" runat="server" ForeColor="Red" Text="Not null" 
                    Visible="False"></asp:Label>
            </div>
        </div>
        <div class="clear"></div>
        <div class="row">
            <div class="left">Start Date:</div>
            <div class="right">
            <telerik:RadDatePicker ID="RadDatePicker1" runat="server" DateInput-DateFormat="dd/MM/yyyy">
            </telerik:RadDatePicker>
            <asp:Label ID="lblsDateError" runat="server" ForeColor="Red" Text="Not null" 
                    Visible="False"></asp:Label>    
            </div>
        </div>
        <div class="clear"></div>
        <div class="row">
            <div class="left">End Date:</div>
            <div class="right">
            <telerik:RadDatePicker ID="RadDatePicker2" runat="server" DateInput-DateFormat="dd/MM/yyyy">
            </telerik:RadDatePicker>
            <asp:Label ID="lbleDateError" runat="server" ForeColor="Red" Text="Not null" 
                    Visible="False"></asp:Label>
            </div>
        </div>
        <div class="clear"></div>
        <div class="row">
            <div class="left"></div>
            <div class="right">
                <asp:Button ID="cmdSearch" runat="server" Text="Search" 
                    onclick="cmdSearch_Click" />
                &nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="cmdHide" runat="server" Text="Hide" onclick="cmdHide_Click" />
                &nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="cmdClear" runat="server" Text="Clear" 
                    onclick="cmdClear_Click" />
                <asp:Button ID="cmdViewRS" runat="server" Text="View Result" 
                    onclick="cmdViewRS_Click" />
            </div>
        </div>
        <div class="clear"></div>
        <asp:Panel ID="PanelResult" runat="server">
        <div class="row">
            <div class="left"></div>
            <div class="right">
                <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                    BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
                    CellPadding="8" ForeColor="Black" GridLines="Vertical">
                    <FooterStyle BackColor="#CCCC99" />
                    <RowStyle BackColor="#F7F7DE" />
                    <Columns>
                        <asp:BoundField DataField="number" />
                        <asp:BoundField DataField="id" HeaderText="ID" />
                        <asp:BoundField DataField="title" HeaderText="Title" />
                        <asp:BoundField DataField="fullName" HeaderText="By" />
                    </Columns>
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
            </div>
        </div>
        <div class="clear"></div>
    </asp:Panel>
</asp:Panel>
    <div style="text-align:center;margin:10px;font-weight:bold;font-size:14px;color:#ffa800;">
        <asp:Label ID="lblResult" runat="server"></asp:Label>
    </div> 
<asp:Panel ID="Panel2" runat="server">
    <asp:GridView ID="GridView1" runat="server" BackColor="White" 
        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="6" 
        ForeColor="Black" GridLines="Horizontal" AllowPaging="True" 
        AutoGenerateColumns="False" Width="990px" DataKeyNames="id" 
        onrowdeleting="GridView1_RowDeleting" onrowediting="GridView1_RowEditing" 
        onpageindexchanging="GridView1_PageIndexChanging">
        <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
        <Columns>
            <asp:BoundField DataField="id" HeaderText="ID" />
            <asp:BoundField DataField="title" HeaderText="Title" />
            <asp:BoundField DataField="status" HeaderText="Status" />
            <asp:BoundField DataField="sdate" HeaderText="Start Date" />
            <asp:BoundField DataField="eDate" HeaderText="End Date" />
            <asp:BoundField DataField="result" HeaderText="Has Result" />
            <asp:CommandField EditImageUrl="~/images/Admin/hammer_screwdriver.png" HeaderText="Edit" 
                ShowEditButton="True" ButtonType="Image" >
                <ItemStyle Font-Underline="True" HorizontalAlign="Center" Width="40px" />
            </asp:CommandField>
            <asp:TemplateField HeaderText="Delete">
                <ItemTemplate>
                    <asp:Button ID="deleteButton" runat="server" CommandName="Delete" style="width:16px;height:16px;background:url(../images/Admin/cross.png);border:none;cursor:pointer;" OnClientClick="return confirm('Are you sure?');" />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="40px" />
            </asp:TemplateField>
        </Columns>
        <PagerStyle BackColor="#99CCFF" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
    </asp:GridView>

 </asp:Panel>

</asp:Content>

